import {v4 as uuid} from 'uuid'
export const uuId = ()=>{
    //先查看本地是否有id
    let id = localStorage.getItem('USER_ID')

    // 如果本地没有  就重新添加一个
    if(!id){
        id = uuid();
        // 再将新的存储到本地
        localStorage.setItem('USER_ID',id)
    }
    
    return id
}